<?php

namespace app\admin\controller;

use app\admin\controller\Base;
use think\Db;

class Index extends Base
{
    /*
     * 我的桌面
     * */
    public function index()
    {
        return $this->fetch();
    }

    /*
     * 欢迎页面
     * */
    public function welcome()
    {
        $articleCount = Db::name('article')->count();
        $messageCount = Db::name('message')->count();

        $this->assign('aCount',$articleCount);
        $this->assign('mCount',$messageCount);

        return $this->fetch();
    }
}
